//
//  WZGScanViewController.m
//  SinaWeibo-OC
//
//  Created by apple on 15/12/7.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "WZGScanViewController.h"

@interface WZGScanViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *QcodeConstraint;

@end

@implementation WZGScanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
  
    //创建定时器
    CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
    
    [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
}

- (void)update{
    
    self.QcodeConstraint.constant -= 5;
    
    if (self.QcodeConstraint.constant == -170) {
        
        self.QcodeConstraint.constant = 170;
    }
}
@end
